<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="<?php echo $this->baseUrl;?>/admincss/mstyle.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl;?>/css/front.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl;?>/js/jquery-ui/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script>
<?php if($this->change){?>

alert("修改成功");
<?php }?>
</script>
<form method="post" action="<?php echo $this->url($this->baseUrl, 'manage', 'uchange', 'uid='.$this->uid. '&mid=' . $this->mid); ?>">
<table  width="100%" border="1" class="tableA">                
                  <?php foreach($this->regitems as $v):
                  //if (!$v['show'])continue;
                  	if ($v['type'] == 7){
echo <<<EOT

EOT;
					}elseif($v['type'] == 8){
echo <<<EOT

EOT;
					}else{
$title = $v['title'];
$require = $v['required']?'<span class="c_red">*</span>':"";
$str = "";
$def = $this->uitems[$v['uuid']];
$beizhu = $v['beizhu'];
if (!empty($beizhu)){
	$beizhu = "<span  class=\"c_gray9\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $beizhu . "</span>";
}

					
switch($v['type']){
case 1:
	$str = '<input id="'.$v['uuid'].'" name="' . $v['uuid'] . '" value="' . htmlspecialchars($def) . '" size="40" type="text" class="input_style" />';
	break;
case 2:
	$str = '<textarea id="' .$v['uuid'] . '" name="' . $v['uuid'] .'" cols="40" rows="6">' . htmlspecialchars($def) .'</textarea>';
	break;
case 3:
	$str = "";
	$vals = explode("\n", $v['value']);
	$envals = explode("\n", $v['envalue']);
	foreach($vals as $tindex => $vv){
		$vv = trim($vv);
		if ($vv == $def || $envals[$tindex] == $def)
			$s_checked = " checked=\"checked\"";
		else
			$s_checked = "";
		if ($tindex == 0)
			$str .= '<label><input name="' . $v['uuid'] . '" type="radio" value="' . htmlspecialchars($vv) . '" ' . $s_checked . '/> ' . $vv . '</label>';
		else
			$str .= '<label class="create_radio_margin"><input name="' . $v['uuid'] . '" type="radio" value="' . htmlspecialchars($vv) . '" ' . $s_checked . '/> ' . $vv . '</label>';
	}
	break;
case 4:
	$str = "";
	$vals = explode("\n", $v['value']);
	$envals = explode("\n", $v['envalue']);
	foreach($vals as $tindex => $vv){
		$vv = trim($vv);
		$s_checked = "";
		if (is_array($def)){
			if (in_array($vv, $def) || in_array($envals[$tindex], $def))
				$s_checked = "checked=\"checked\"";
		}
		
		if ($tindex == 0)
			$str .= '<label><input ' . $s_checked .' name="' . $v['uuid'] . '[]" type="checkbox" value="' . htmlspecialchars($vv) . '" /> ' . $vv . '</label>';
		else
			$str .= '<label class="create_radio_margin"><input ' . $s_checked . 'name="' . $v['uuid'] . '[]" type="checkbox" value="' . htmlspecialchars($vv) . '" /> ' . $vv . '</label>';
	}
	break;
case 5:
	$str = "<select id=\"{$v['uuid']}\" name=\"" . $v['uuid'] . "\">";
	$vals = explode("\n", $v['value']);
	$envals = explode("\n", $v['envalue']);
	foreach($vals as $tindex => $vv){
		$vv = trim($vv);

		if ($vv == $def || $envals[$tindex] == $def)
			$s_checked = " selected=\"selected\"";
		else
			$s_checked = "";
		
		$str .= '<option ' . $s_checked . ' value="' . htmlspecialchars($vv) . '">' . $vv . '</option>';
	}
	$str .= "</select>";
	break;
case 6:
	$str = '<input value="' . htmlspecialchars($def) .'" id="' . $v['uuid'] . '" name="' . $v['uuid'] . '" size="20" type="text" class="input_style f_l datepicker_start" style="margin-right:5px;"/>';
	break;
}
echo <<<EOT
				<tr>
				<th>{$require} {$title}：</th>
				<td>{$str}&nbsp;&nbsp;{$beizhu}</td>
				</tr>
EOT;
					}
                  ?>
                  <?php endforeach;?>
                  <tr>
                    <th></th>
                    <td><input id="form_submit" name="form_submit" type="submit" value="提 交" class="btn_blue30 line_bg_all" /></td>
                  </tr>
                </table>
                </form>
                
                
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui/jquery.ui.core.min.js"></script>
<script type="text/javascript" src="js/jquery-ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="js/jquery-ui/jquery.ui.datepicker.min.js"></script>
<script type="text/javascript" src="js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
<script>
$(function() {
	$(".datepicker_start").datepicker({buttonImageOnly: true,buttonImage: "images/calendar.png",showOn: "button",
		changeMonth:true,constrainInput:true});
});
</script>
</body>
</html>
